package com.jiujiu.model.DataBaseCommon;

/**
 * @author ZhaoJunZhou
 * @Date 2020/10/13
 */
public class EntityModelBySql {
    /**列名转化为了驼峰命名*/
    private String column;
    /**
     * 类名已经转换为了适用Java的类型
     */
    private String columnType;
    /**
     * 未转换未驼峰
     */
    private String columnLabel;


    public String getColumnLabel() {
        return columnLabel;
    }

    public void setColumnLabel(String columnLabel) {
        this.columnLabel = columnLabel;
    }

    public String getColumn() {
        return column;
    }

    public EntityModelBySql(String column, String columnType,String columnLabel) {
        this.column = column;
        this.columnType = SqlTypeFormat.sqlTypeToJava(columnType);
        this.columnLabel = columnLabel;
        System.out.println(String.format("名称：%s,类型：%s,列名: %s",column,columnType,columnLabel));
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    @Override
    public String toString() {
        return "EntityModelBySql{" +
                "column='" + column + '\'' +
                ", columnType='" + columnType + '\'' +
                ", columnLabel='" + columnLabel + '\'' +
                '}';
    }
}
